package flc.ast.activity;

import androidx.appcompat.app.AppCompatActivity;

import android.graphics.Bitmap;
import android.os.Bundle;
import android.view.View;

import java.util.List;

import flc.ast.BaseAc;
import flc.ast.R;
import flc.ast.databinding.ActivityAnimalRecBinding;
import stark.common.apis.base.ImgAnimalRet;

public class AnimalRecActivity extends BaseAc<ActivityAnimalRecBinding> {

    public static Bitmap sBitmap;
    public static List<ImgAnimalRet> sAnimRets;

    @Override
    protected int onCreate() {
        return R.layout.activity_animal_rec;
    }

    @Override
    protected void initView() {
        mDataBinding.ivAnimalRecBack.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                onBackPressed();
            }
        });
    }

    @Override
    protected void initData() {
        mDataBinding.tvResultName.setText(sAnimRets.get(0).name);
        mDataBinding.tvResultDesc.setText(sAnimRets.get(0).baike_info.description);
        mDataBinding.ivResultImg.setImageBitmap(sBitmap);
    }
}